package GreatBattleOfAircraft.obj;

import GreatBattleOfAircraft.Main;
import GreatBattleOfAircraft.utils.GameUtils;

import java.awt.*;

public class ShellObj extends GameObj {
    @Override
    public Image getImg() {
        return super.getImg();
    }

    public ShellObj() {
        super();
    }

    public ShellObj(Image img, int x, int y, int width, int height, double speed, Main frame) {
        super(img, x, y, width, height, speed, frame);
    }

    @Override
    public void painSelf(Graphics graphics) {
        super.painSelf(graphics);
       y -= speed;

       if (y<0){
           this.x = -1200;
           GameUtils.removeObjList.add(this);
       }
    }

    @Override
    public Rectangle getRec() {
        return super.getRec();
    }
}
